package com.mxpio.erp.common.plan.service;

import com.mxpio.erp.common.plan.entity.SalePredictionLine;
import com.mxpio.erp.common.plan.entity.SalePredictionOffsettingFlow;
import com.mxpio.erp.common.sales.entity.SalesOrderLine;
import com.mxpioframework.jpa.query.Criteria;
import com.mxpioframework.system.service.BaseService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface SalePredictionOffsettingFlowService extends BaseService<SalePredictionOffsettingFlow> {
    @Transactional
    void handleQuantityFromSO(List<SalesOrderLine> salesOrderLineList);

    @Transactional
    void handleQuantityFromSP(List<SalePredictionLine> salePredictionLines);

    void handleSaveData(List<SalePredictionOffsettingFlow> salePredictionOffsettingFlows);

    @Transactional(readOnly = false)
    Page<SalePredictionOffsettingFlow> listPage(Pageable page, Criteria c);
}
